package com.scalar.forecast.projectSetup.actionCommands;

import com.scalar.forecast.actionCommands.ActionCommand;
import com.scalar.forecast.commons.Constants;


/**
 * Returns the Action Command Instance based on the action value passed
 *
 * Created by Veeru.
 * Date: Oct 10, 2005
 * Time: 5:44:11 PM
 */

public class MapPartNumbersActionCommandFactory implements Constants {

    public static ActionCommand getActionCommand( String action ) {

        if ( ACTION_SHOW.equalsIgnoreCase( action ) ) {
            return new MapPartNumbersCommand();
        }
        if ( ACTION_SAVE.equalsIgnoreCase( action ) ) {
            return new MapPartNumbersSaveCommand();
        }
        if ( ACTION_EDIT.equalsIgnoreCase( action ) ) {
            return new MapPartNumbersEditCommand();
        }
        if ( ACTION_CONFIRM.equalsIgnoreCase( action ) ) {
            return new MapPartNumbersConfirmCommand();
        }
        return null;
    }
}
